home *** CD-ROM | disk | FTP | other *** search
- Program : DATADISP (Main)
- Authors : W.E.R. Stroebel.
- Purpose : Displaying an unknown file in a "readable" way.
- Modules : None
- Compile : TCC, large model, enable stack checking.
- Created : June 29, 1989
- Edited : June 30, 1989
- - Small problem with labels fixed.
- - Unknowns > 16 bytes split.
-
- **************************** Documentation. ********************************
-
- DATADISP is just a small program I put together to figure out some game score
- keeping files (no, I don't habitually cheat, just every other Thursday of
- months without a "R" in them <GRIN>).
-
- You start the program (after compiling it first, DOS doesn't like to execute
- "C" source code, a major flaw in the operating system if you ask me) by typing
- a command line like :
-
- DATADISP DEMODATA DEMODATA.DES
-
- The second parameter is optional, it serves to keep the item descriptors in
- so you don't have to type them every time you run the program.
-
- Commands in DATADISP are as follows :
-
- A - Add an item descriptor. Asks for the item number to describe and what the
- description should be.
- R - Remove an item descriptor.
- D - Display file starting at a certain descriptor.
- F - File has a fixed record size. Use this command after you have figured out
- all (or most) of the file's record structure. It will ask you for a first
- and last item number and copy them throughout the remainder of the file.
- The reason for asking for a FIRST item number is that a lot of data files
- have some sort of header that doesn't fit in a record.
- L - Label. Add a name to an item (max 4 characters for display reasons).
- Q - Quit. Terminates program (and saves your work if you specified a
- descriptor file).
-
- DATADISP knows about the following types :
-
- D (Double) - Data is a double word (length 4) or a double real (length 8).
- F (Fixed) - Data is a fixed length string (zero padding is NOT displayed).
- I (Integer) - Data is an integer.
- L (Length) - Data is a length coded string (first byte has length) OR :
- L (Long) - Data is a long integer.
- R (Real) - Data is a single precision real.
- U (Unknown) - Data is displayed in 16 byte chunks, hex and Ascii.
- W (Word) - Data is an unsigned.
- Z (AsciiZ) - Data is a zero terminated string.
-
- ******************************* Example. ***********************************
-
- The enclosed file DEMO.C was used to create a small nonsense data file
- (DEMODATA). The file was decoded using the following commands :
-
- A 0 <RET> S A 17 <RET>
- A 1 <RET> D W
- A 2 <RET> R D
- L 0 <RET> Name <RET>
- L 1 <RET> Age <RET>
- L 2 <RET> Debt <RET>
- F 0 <RET> 2 <RET>
-
- generating the file DEMODATA.DES. Try entering these commands after starting
- DATADISP with the command :
-
- DATADISP DEMODATA MYFILE
-
- to see how this works.
-
- ******************************* Various. ***********************************
-
- (This section is called "Various" because I was to lazy to type
- "Miscellaneous". It contains some things you might want to know.)
-
- Copyright : None except for common decency. If you make money selling this
- program (great salesmanship there) let me know, I'm sure we can
- work something out.
- Limits : There is a maximum number of items (8125). When no descriptors
- have been entered this limits the maximum file size to 130000
- bytes.
- Support : None. If NEVER support programs I put out in source, people have
- a tendency to change 'm and it's too much trouble to figure out
- what (if anything) happened.
- Disclaimer : This program is NOT guaranteed to do ANYTHING, let alone do
- something useful. It's unlikely to destroy anything but you can
- never know. Watch out what you put in as second parameter, any
- file with the same name will be destroyed.
-
-
-
- Hope you'll enjoy this program.
- Walter E.R. Stroebel.
- CIS UID : 71170,1267
-